package com.java.system.common.entity.system;

import com.java.system.common.entity.BaseEntity;
import com.java.system.common.entity.admin.SysCompany;
import com.java.system.common.entity.admin.SysUser;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @ClassName: SysCompanyArea
 * @Description:
 * @Version: v1.0.0
 * @Author: Shan Feiyang
 * @Date: 2019/9/12 13:54
 * Modification History:
 * Date           Author           Version     Description
 * -------------------------------------------------------------
 * 2019/9/12      Shan Feiyang        v1.0.0         创建
 */
@ApiModel(value = "公司区域表")
@Table(name = "sys_company_area")
@Data
@Accessors(chain = true)
public class SysCompanyArea extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;


    @Column(name = "parent_id")
    @ApiModelProperty(value = "上级区域ID")
    private String parentId;
    /**
     * 公司ID
     */
    @Column(name = "company_id")
    @ApiModelProperty(value = "公司ID")
    private String companyId;

    /**
     * 区域名称
     */
    @Column(name = "name")
    @ApiModelProperty(value = "区域名称")
    private String name;

    /**
     * 区域编码
     */
    @Column(name = "code")
    @ApiModelProperty(value = "区域编码")
    private String code;

    /**
     * 排序
     */
    @Column(name = "seq")
    @ApiModelProperty(value = "排序")
    private Integer seq;

    /**
     * 是否分销区域： 0 = 是， 1 = 否
     */
    @Column(name = "is_disarea")
    @ApiModelProperty(value = "是否分销区域： 0 = 是， 1 = 否")
    private Integer isDisarea;

    /**
     * 备注
     */
    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Transient
    private SysCompany company;

    @Transient
    private SysUser user;
}

